home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 2.3 KB | 77 lines | [TEXT/MPS ] |
- //----------------------------------------------------------------------------------------
- // UViewSkeleton.cp
- // Copyright © 1991-96 by Apple Computer, Inc. All rights reserved.
- //----------------------------------------------------------------------------------------
-
- #ifndef __TRowSelectGridView__
- #include "TRowSelectGridView.h"
- #endif
-
- #undef Inherited
-
- //========================================================================================
- // Global Initialization Procedure
- //========================================================================================
- //----------------------------------------------------------------------------------------
- // InitTRowSelectGridView:
- //----------------------------------------------------------------------------------------
- #pragma segment DlgInit
-
- void InitTRowSelectGridView()
- {
- MA_REGISTER_CLASS(TRowSelectGridView);
- }
-
- //========================================================================================
- // CLASS TRowSelectGridView
- //========================================================================================
- #undef Inherited
- #define Inherited TTextGridView
-
- #pragma segment AOpen
- MA_DEFINE_CLASS_M1(TRowSelectGridView, TTextGridView);
-
- TRowSelectGridView::TRowSelectGridView()
- {
- }
-
- TRowSelectGridView::~TRowSelectGridView()
- {
- }
-
- #pragma segment GVRes
- void TRowSelectGridView::GetText(GridCell aCell, CStr255& aString)
- {
- CStr255 numStr;
- NumToString(aCell.h, aString);
- aString += ", ";
- NumToString(aCell.v, numStr);
- aString += numStr;
- }
-
-
- //----------------------------------------------------------------------------------------
- // TRowSelectGridView::DoMouseCommand
- //----------------------------------------------------------------------------------------
- #pragma segment ASelCommand
-
- void TRowSelectGridView::DoMouseCommand(VPoint& theMouse,
- TToolboxEvent* event,
- CPoint /* hysteresis */) // Override
- {
- GridCell aCell;
-
- if ((this->IdentifyPoint(theMouse, aCell) != badChoice)
- && this->CanSelectCell(aCell))
- {
- TRowSelectCommand * aRowSelectCommand = new TRowSelectCommand;
- aRowSelectCommand->IRowSelectCommand(this, theMouse, event->IsShiftKeyPressed(), event->IsCommandKeyPressed());
- this->PostCommand(aRowSelectCommand);
- }
- }
-
- //----------------------------------------------------------------------------------------
- // End of TRowSelectGridView.cp
-
- #pragma segment Inline
-